Repository navigation
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Comment |
kaix-nv
added this pull request to stack #2563
October 5, 2026 06:11
kaix-nv
removed this pull request from stack #2563
October 5, 2026 06:15
kaix-nv
added this pull request to stack #2658
October 5, 2026 06:15
This was referenced Oct 5, 2026
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 6, 2026 17:27
2829885 to
3837d28
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 6, 2026 19:55
3837d28 to
b7401f7
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 6, 2026 21:26
b7401f7 to
0357915
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 8, 2026 05:35
0d898ac to
7717ea4
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## kaix/linear-attention-decode-first #2657 +/- ##
===================================================================
Coverage 68.37% 68.37%
===================================================================
Files 660 660
Lines 73810 73810
===================================================================
Hits 50464 50464
Misses 23346 23346
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
kaix-nv
removed this pull request from stack #2658
October 8, 2026 18:41
kaix-nv
added this pull request to stack #2714
October 8, 2026 18:41
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 8, 2026 22:40
7717ea4 to
942115a
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
2 times, most recently
from
October 11, 2026 06:22
1dacb59 to
5731740
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 12, 2026 23:11
5731740 to
5de2761
Compare
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
2 times, most recently
from
October 14, 2026 06:27
0b90b4f to
4db2574
Compare
kaix-nv
removed this pull request from stack #2714
October 14, 2026 06:28
kaix-nv
added this pull request to stack #2789
October 14, 2026 06:29
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Update the linear-attention example for the flat execution config, native state-only training, and checkpoint migration. Remove the retired CPU reference script while retaining its historical results and source link. Record the focused CPU, native GPU, Megatron checkpoint, and config migration validation. Documentation pre-commit hooks passed. Signed-off-by: Kai Xu <kaix@nvidia.com>
Document the QDQ scheduling and arithmetic mismatch, the native prefix/handoff/suffix solution, gradient flow, and the limits of current validation. Align configuration guidance with the current state QAT API. Signed-off-by: Kai Xu <kaix@nvidia.com>
Remove raw experiment JSON from the example and shorten the usage and state-alignment documents. Retain the mismatch derivation, supported policies, concise numerical results, and validation limits. Preserve development evidence in an untracked local archive. Training code and minimal QAT/QAD tests are unchanged. Validation: scoped pre-commit, documentation links and anchors, Python snippet syntax, archive integrity, and git diff --check. Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
Signed-off-by: Kai Xu <kaix@nvidia.com>
kaix-nv
force-pushed
the
kaix/linear-attention-qat-example
branch
from
October 14, 2026 20:17
4db2574 to
acdc5ab
Compare
kaix-nv
removed this pull request from stack #2789
October 14, 2026 20:18
kaix-nv
added this pull request to stack #2806
October 14, 2026 20:19
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linear-attention series — 8 PRs
mainThe seven open PRs form native GitHub stack #2806 in this order. #2497 has landed, so #2519 targets
main. #2805 contains NVFP4 and is based on #2657; #2788 and #2541 are rebased in sequence. #2503 and #2507 retain their existing commits; their rebases remain deferred until their immediate parents merge.#2788 owns ReplaySSM and the planned two-precision design; the two-precision design is not implemented yet. #2541 owns vLLM engine integration. Serving-time prefill-GEMM QDQ remains deferred until an optimized fused kernel is available.
What does this PR do?
Type of change: New example.
Add a runnable Megatron Bridge example for recurrent-state QAT and QAD, using #2519's runtime. Bridge owns distributed scheduling, optimization and checkpoints. Both modes use
pretrain(config, forward_step); QAD adds a frozen teacher throughDistillationProvider.For prompt/completion data, the example now derives each prefix from collator metadata (
context_lengthsandtoken_count, or explicitprefill_lengthsandsequence_lengths). It never guesses prompts from loss-mask values. Right padding is excluded; custom packed batches supply per-segment prompt/valid lengths and storage boundaries. Token-only data retains the explicit fixed-split option. Multi-turn data must be rendered into a prompt and selected target continuation before tokenization.Data-derived phases support TP/DP with PP=1 and CP=1. Fixed-length data retains the existing TP/PP/EP options and CP=1. TP ranks share the phase metadata. The adapter consumes a
__next__-only iterator once, and applies the phase to the student only.The dependency files document Bridge
056b78e/ Coree998be07and pin public vLLM 0.30.0. A KDA model additionally needs a compatible Bridge provider; the real-model workflow evidence is GDN.Usage
Prompt/completion SFT data: a directory containing
training.jsonlrecords withinputandoutputfields. Without--prefill-tokens, the prompt lengths come from the tokenizer/collator.Add
--teacher-model /path/to/unquantized-modelfor QAD. For token-only indexed data, replace--sft-datawith--train-data /path/to/train_text_document --prefill-tokens 64. See the example README for export/load instructions and STATE_QUANTIZATION.md for the prefix/decode mismatch and gradient design.Testing
Rebased onto #2519 at
662fd69622; the parent-relative diff contains the example, tests and documentation.No KDA Bridge-provider, long-context quality, or full-engine serving claim is made. The chunk-boundary versus prefix/suffix training-strategy comparison is deferred.
Before your PR is "Ready for review"
Additional Information
Step 3/8. State formats and execution are supplied by the parent; NVFP4 and ReplaySSM follow separately. Raw experiment records and the working design walkthrough remain outside the committed example.